docs: fix ingest auth accuracy, expand operations and developer reference#23
Merged
Merged
Conversation
… and SECURITY.md The auth table in docs/http-api.md labelled POST /v1/events as "loopback only" with a footnote, which implied server-side enforcement. In reality, server/routes/ingest.py has no host or token check — only POST /v1/promote and POST /v1/rollback call _require_mutation_access in actions.py. - Update the auth table to mark POST /v1/events as "open" with a footnote that explains no server-side gate exists; security relies on bind address + network topology. - Update SECURITY.md to be explicit that ingest and diff are open to any caller that can reach the server, and that network-layer controls are needed when --host 0.0.0.0 is used. Co-authored-by: Gottam Sai Bharath <Gsbreddy@users.noreply.github.com>
DEVELOPMENT.md: - Add a dedicated "What flightdeck-quickstart-verify does" subsection that documents the 11-step quickstart workflow run in CI, subprocess error handling, executable resolution strategy (PATH vs sys.executable fallback), and the isolated temp-dir approach. docs/operations-and-policy.md: - Add "Server initialization: lifespan vs. ensure_app_state" section under the architecture diagram: documents how create_app lifespan initializes app.state (cfg, storage, local_api_token), how ensure_app_state lazily re-initializes on first request when state is absent (e.g. in tests), the cwd-at-first-request implication for flightdeck.yaml resolution, and the "testclient" host in _LOCAL_CLIENT_HOSTS. - Add "Operational runbook" section at the end with: - SQLite SQLITE_BUSY causes and remedies - Backup and restore procedure (offline copy + WAL checkpoint pattern) - doctor failure interpretation table for each check with specific fix guidance - Inline sqlite3 query for audit_seq inspection Co-authored-by: Gottam Sai Bharath <Gsbreddy@users.noreply.github.com>
Gsbreddy
approved these changes
May 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Correct a security-relevant documentation inaccuracy and expand two reference docs with information that was missing or scattered across the codebase.
Why
The auth table in
docs/http-api.mdlabelledPOST /v1/eventsas "loopback only†" which implied server-side enforcement. In reality,server/routes/ingest.pyhas no host or token check — onlyPOST /v1/promoteandPOST /v1/rollbackcall_require_mutation_access. This gap meant operators using--host 0.0.0.0could believe ingest was protected when it is not. Two other areas had no dedicated documentation: theflightdeck-quickstart-verifyCLI tool and operational runbook for SQLite, doctor failures, and backup.Changes
docs/http-api.mdPOST /v1/eventsauth column from "loopback only†" to "open†"--host 0.0.0.0makes ingest reachable from any hostSECURITY.mdPOST /v1/eventsandPOST /v1/diffhave no server-side host/token check, distinguishing them from the mutation routesDEVELOPMENT.mdflightdeck-quickstart-verifydoes" subsection documenting the 11-step end-to-end workflow, subprocess error handling, executable resolution (PATH →sys.executablefallback), and temp-dir isolationdocs/operations-and-policy.mdensure_app_state" section documenting howcreate_applifespan populatesapp.state, the lazy-fallback behavior ofensure_app_statefor test contexts, the cwd-at-first-request implication, and"testclient"in_LOCAL_CLIENT_HOSTSSQLITE_BUSYcauses and remedies, backup/restore procedure (offline copy + WAL checkpoint pattern), and a doctor failure interpretation table with fix guidance per checkValidation
uv sync --frozen --extra devuv run python -m ruff check src tests— passesuv run python -m pytest— doc-only change; no Python source touchedweb/not touched — no static build neededSchema / Storage Impact
Risk
Documentation only. No Python source, schema, or static asset changes.
Review
Notes
Source of truth for ingest auth:
src/flightdeck/server/routes/ingest.py(no_require_mutation_accesscall) vssrc/flightdeck/server/routes/actions.py(both promote and rollback call it).